{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/gwf25/Desktop/Table 1.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 7 Dec 2015, 10:06:40

{com}. do "/Users/gwf25/Dropbox/research/religion/final code/Table 1.do"
{txt}
{com}. clear all
{txt}
{com}. set mem 30m
{txt}(30720k)

{com}. set more off
{txt}
{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}
{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}
{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}(4 observations deleted)

{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}(5 observations deleted)

{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt}(2 observations deleted)

{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt}
{com}. replace skipped=1 if  s10q15==""
{txt}(21 real changes made)

{com}. gen treatR=.
{txt}(1033 missing values generated)

{com}. replace treatR=religion if skipped==0
{txt}(1012 real changes made)

{com}. drop if skipped==1
{txt}(21 observations deleted)

{com}. 
. ***Define religion
. gen relig=.
{txt}(1012 missing values generated)

{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt}(264 real changes made)

{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt}(199 real changes made)

{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt}(95 real changes made)

{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt}(269 real changes made)

{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt}(2 observations deleted)

{com}. drop if s10q15sp == "Russian Othrodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "greek orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthdox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "christian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Russian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox"
{txt}(0 observations deleted)

{com}. 
. // End of variables
. 
. drop if relig == .
{txt}(185 observations deleted)

{com}. 
. *MALE
. tab s10q8

      {txt}s10q8 {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     Female {c |}{res}        427       52.33       52.33
       {txt}Male {c |}{res}        389       47.67      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        816      100.00
{txt}
{com}. gen male = .
{txt}(817 missing values generated)

{com}. replace male = 1 if s10q8 == "Male"
{txt}(389 real changes made)

{com}. replace male = 0 if s10q8 == "Female"
{txt}(427 real changes made)

{com}. 
. su male if relig == 1

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 8}male {c |}{res}       254    .4173228    .4940907          0          1
{txt}
{com}. su male if relig == 2

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 8}male {c |}{res}       198    .4646465    .5000128          0          1
{txt}
{com}. su male if relig == 3

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 8}male {c |}{res}        95    .6105263    .4902179          0          1
{txt}
{com}. su male if relig == 4

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 8}male {c |}{res}       269    .4944238    .5009008          0          1
{txt}
{com}. su male

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 8}male {c |}{res}       816    .4767157    .4997639          0          1
{txt}
{com}. 
. *BORN IN US
. gen usa = .
{txt}(817 missing values generated)

{com}. replace usa = 0 if s10q13 ~= ""
{txt}(810 real changes made)

{com}. replace usa = 1 if s10q13 == "America"
{txt}(17 real changes made)

{com}. replace usa = 1 if s10q13 == "The U.S."
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "The United States"
{txt}(5 real changes made)

{com}. replace usa = 1 if s10q13 == "The United States of America"
{txt}(5 real changes made)

{com}. replace usa = 1 if s10q13 == "U.S"
{txt}(2 real changes made)

{com}. replace usa = 1 if s10q13 == "U.S."
{txt}(28 real changes made)

{com}. replace usa = 1 if s10q13 == "U.S.A"
{txt}(2 real changes made)

{com}. replace usa = 1 if s10q13 == "U.S.A."
{txt}(8 real changes made)

{com}. replace usa = 1 if s10q13 == "UNITED STATES"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "US"
{txt}(54 real changes made)

{com}. replace usa = 1 if s10q13 == "US of A"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "US, but spent childhood elsewhere"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "USA"
{txt}(250 real changes made)

{com}. replace usa = 1 if s10q13 == "Uinted States"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "United Staes"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "United Staets"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "United Statees of America"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "United States"
{txt}(130 real changes made)

{com}. replace usa = 1 if s10q13 == "United States of America"
{txt}(44 real changes made)

{com}. replace usa = 1 if s10q13 == "`United States of America"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "america"
{txt}(3 real changes made)

{com}. replace usa = 1 if s10q13 == "the United States"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "the united states"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "this one"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "u.s"
{txt}(1 real change made)

{com}. replace usa = 1 if s10q13 == "united States"
{txt}(2 real changes made)

{com}. replace usa = 1 if s10q13 == "united states"
{txt}(21 real changes made)

{com}. replace usa = 1 if s10q13 == "united states of america"
{txt}(2 real changes made)

{com}. replace usa = 1 if s10q13 == "us"
{txt}(12 real changes made)

{com}. replace usa = 1 if s10q13 == "usa"
{txt}(24 real changes made)

{com}. 
. su usa if relig == 1

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}usa {c |}{res}       252    .7857143    .4111425          0          1
{txt}
{com}. su usa if relig == 2

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}usa {c |}{res}       197    .8020305    .3994843          0          1
{txt}
{com}. su usa if relig == 3

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}usa {c |}{res}        95    .9578947    .2018947          0          1
{txt}
{com}. su usa if relig == 4

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}usa {c |}{res}       266    .6578947    .4753089          0          1
{txt}
{com}. su usa

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}usa {c |}{res}       810    .7679012    .4224325          0          1
{txt}
{com}. 
. *median income
. gen incMedRel1 = .
{txt}(817 missing values generated)

{com}. 
. tab s10q26

                     {txt}s10q26 {c |}      Freq.     Percent        Cum.
{hline 28}{c +}{hline 35}
                          . {c |}{res}          9        1.15        1.15
{txt}Between $20,000 and $39,999 {c |}{res}         64        8.17        9.32
{txt}Between $40,000 and $59,999 {c |}{res}         76        9.71       19.03
{txt}Between $60,000 and $79,999 {c |}{res}        110       14.05       33.08
{txt}Between $80,000 and $99,999 {c |}{res}        125       15.96       49.04
              {txt}Over $100,000 {c |}{res}        367       46.87       95.91
              {txt}Under $20,000 {c |}{res}         32        4.09      100.00
{txt}{hline 28}{c +}{hline 35}
                      Total {c |}{res}        783      100.00
{txt}
{com}. gen inc = .
{txt}(817 missing values generated)

{com}. replace inc = 1 if s10q26 == "Under $20,000"
{txt}(32 real changes made)

{com}. replace inc = 2 if s10q26 == "Between $20,000 and $39,999"
{txt}(64 real changes made)

{com}. replace inc = 3 if s10q26 == "Between $40,000 and $59,999"
{txt}(76 real changes made)

{com}. replace inc = 4 if s10q26 == "Between $60,000 and $79,999"
{txt}(110 real changes made)

{com}. replace inc = 5 if s10q26 == "Between $80,000 and $99,999"
{txt}(125 real changes made)

{com}. replace inc = 6 if s10q26 == "Over $100,000"
{txt}(367 real changes made)

{com}. 
. su inc if relig == 1, detail 

                             {txt}inc
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        2              1
{txt}10%    {res}        2              1       {txt}Obs         {res}        241
{txt}25%    {res}        3              1       {txt}Sum of Wgt. {res}        241

{txt}50%    {res}        5                      {txt}Mean          {res} 4.493776
                        {txt}Largest       Std. Dev.     {res} 1.546826
{txt}75%    {res}        6              6
{txt}90%    {res}        6              6       {txt}Variance      {res} 2.392669
{txt}95%    {res}        6              6       {txt}Skewness      {res}-.6753711
{txt}99%    {res}        6              6       {txt}Kurtosis      {res} 2.289776
{txt}
{com}. su inc if relig == 2, detail 

                             {txt}inc
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        1              1
{txt}10%    {res}        2              1       {txt}Obs         {res}        187
{txt}25%    {res}        4              1       {txt}Sum of Wgt. {res}        187

{txt}50%    {res}        5                      {txt}Mean          {res} 4.657754
                        {txt}Largest       Std. Dev.     {res} 1.586394
{txt}75%    {res}        6              6
{txt}90%    {res}        6              6       {txt}Variance      {res} 2.516647
{txt}95%    {res}        6              6       {txt}Skewness      {res}-.9180314
{txt}99%    {res}        6              6       {txt}Kurtosis      {res} 2.597604
{txt}
{com}. su inc if relig == 3, detail 

                             {txt}inc
{hline 61}
      Percentiles      Smallest
 1%    {res}        3              3
{txt} 5%    {res}        4              3
{txt}10%    {res}        4              3       {txt}Obs         {res}         92
{txt}25%    {res}        6              4       {txt}Sum of Wgt. {res}         92

{txt}50%    {res}        6                      {txt}Mean          {res} 5.597826
                        {txt}Largest       Std. Dev.     {res} .7991724
{txt}75%    {res}        6              6
{txt}90%    {res}        6              6       {txt}Variance      {res} .6386765
{txt}95%    {res}        6              6       {txt}Skewness      {res}-1.881027
{txt}99%    {res}        6              6       {txt}Kurtosis      {res} 5.403782
{txt}
{com}. su inc if relig == 4, detail 

                             {txt}inc
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        2              1
{txt}10%    {res}        2              1       {txt}Obs         {res}        254
{txt}25%    {res}        4              1       {txt}Sum of Wgt. {res}        254

{txt}50%    {res}        5                      {txt}Mean          {res} 4.669291
                        {txt}Largest       Std. Dev.     {res} 1.570756
{txt}75%    {res}        6              6
{txt}90%    {res}        6              6       {txt}Variance      {res} 2.467275
{txt}95%    {res}        6              6       {txt}Skewness      {res}-.8844653
{txt}99%    {res}        6              6       {txt}Kurtosis      {res} 2.499524
{txt}
{com}. su inc, detail 

                             {txt}inc
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        2              1
{txt}10%    {res}        2              1       {txt}Obs         {res}        774
{txt}25%    {res}        4              1       {txt}Sum of Wgt. {res}        774

{txt}50%    {res}        5                      {txt}Mean          {res} 4.722222
                        {txt}Largest       Std. Dev.     {res} 1.529899
{txt}75%    {res}        6              6
{txt}90%    {res}        6              6       {txt}Variance      {res} 2.340592
{txt}95%    {res}        6              6       {txt}Skewness      {res}-.9408778
{txt}99%    {res}        6              6       {txt}Kurtosis      {res} 2.680082
{txt}
{com}. 
. *SAT Math
. tab s10q27sp1

  {txt}s10q27sp1 {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
        350 {c |}{res}          1        0.14        0.14
{txt}        420 {c |}{res}          1        0.14        0.29
{txt}        450 {c |}{res}          1        0.14        0.43
{txt}        470 {c |}{res}          1        0.14        0.58
{txt}        480 {c |}{res}          1        0.14        0.72
{txt}        490 {c |}{res}          1        0.14        0.87
{txt}        500 {c |}{res}          1        0.14        1.01
{txt}        520 {c |}{res}          2        0.29        1.30
{txt}        530 {c |}{res}          2        0.29        1.59
{txt}        540 {c |}{res}          3        0.43        2.02
{txt}        550 {c |}{res}          2        0.29        2.31
{txt}        560 {c |}{res}          4        0.58        2.89
{txt}        570 {c |}{res}          1        0.14        3.03
{txt}        580 {c |}{res}          6        0.87        3.90
{txt}        590 {c |}{res}          2        0.29        4.19
{txt}        600 {c |}{res}         11        1.59        5.78
{txt}        610 {c |}{res}          7        1.01        6.79
{txt}        620 {c |}{res}         15        2.17        8.96
{txt}        625 {c |}{res}          1        0.14        9.10
{txt}        630 {c |}{res}          9        1.30       10.40
{txt}        640 {c |}{res}         19        2.75       13.15
{txt}        650 {c |}{res}         23        3.32       16.47
{txt}        660 {c |}{res}         18        2.60       19.08
{txt}        670 {c |}{res}         18        2.60       21.68
{txt}        680 {c |}{res}         28        4.05       25.72
{txt}        690 {c |}{res}         34        4.91       30.64
{txt}        700 {c |}{res}         44        6.36       36.99
{txt}        710 {c |}{res}         37        5.35       42.34
{txt}        720 {c |}{res}         36        5.20       47.54
{txt}        730 {c |}{res}         31        4.48       52.02
{txt}        740 {c |}{res}         29        4.19       56.21
{txt}        750 {c |}{res}         21        3.03       59.25
{txt}        760 {c |}{res}         40        5.78       65.03
{txt}        770 {c |}{res}         21        3.03       68.06
{txt}        780 {c |}{res}         55        7.95       76.01
{txt}        790 {c |}{res}         41        5.92       81.94
{txt}        800 {c |}{res}        123       17.77       99.71
{txt}       1360 {c |}{res}          1        0.14       99.86
{txt}       2200 {c |}{res}          1        0.14      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        692      100.00
{txt}
{com}. gen satM = s10q27sp1
{txt}(125 missing values generated)

{com}. replace satM = . if s10q27sp1 > 800
{txt}(2 real changes made, 2 to missing)

{com}. mean satM if relig == 1
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    201

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satM {c |}{col 14}{res}{space 2} 709.7512{col 26}{space 2} 5.404732{col 37}{space 5} 699.0937{col 51}{space 3} 720.4088
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satM if relig == 2
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    156

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satM {c |}{col 14}{res}{space 2} 707.0833{col 26}{space 2} 5.831228{col 37}{space 5} 695.5644{col 51}{space 3} 718.6023
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satM if relig == 3
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}     90

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satM {c |}{col 14}{res}{space 2} 722.4444{col 26}{space 2} 7.286385{col 37}{space 5} 707.9666{col 51}{space 3} 736.9223
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satM if relig == 4
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    243

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satM {c |}{col 14}{res}{space 2} 743.0864{col 26}{space 2} 3.589734{col 37}{space 5} 736.0153{col 51}{space 3} 750.1575
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satM
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    690

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satM {c |}{col 14}{res}{space 2} 722.5435{col 26}{space 2} 2.655429{col 37}{space 5} 717.3298{col 51}{space 3} 727.7572
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. 
. *SAT Verbal
. tab s10q27sp2

  {txt}s10q27sp2 {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
        350 {c |}{res}          1        0.15        0.15
{txt}        390 {c |}{res}          1        0.15        0.29
{txt}        400 {c |}{res}          1        0.15        0.44
{txt}        420 {c |}{res}          1        0.15        0.58
{txt}        440 {c |}{res}          1        0.15        0.73
{txt}        450 {c |}{res}          1        0.15        0.87
{txt}        480 {c |}{res}          1        0.15        1.02
{txt}        490 {c |}{res}          2        0.29        1.31
{txt}        500 {c |}{res}          7        1.02        2.33
{txt}        510 {c |}{res}          2        0.29        2.62
{txt}        520 {c |}{res}          3        0.44        3.06
{txt}        530 {c |}{res}          4        0.58        3.64
{txt}        540 {c |}{res}          4        0.58        4.22
{txt}        550 {c |}{res}          6        0.87        5.09
{txt}        560 {c |}{res}          7        1.02        6.11
{txt}        570 {c |}{res}          4        0.58        6.70
{txt}        580 {c |}{res}         14        2.04        8.73
{txt}        590 {c |}{res}          6        0.87        9.61
{txt}        600 {c |}{res}         25        3.64       13.25
{txt}        610 {c |}{res}         11        1.60       14.85
{txt}        620 {c |}{res}         30        4.37       19.21
{txt}        630 {c |}{res}         25        3.64       22.85
{txt}        640 {c |}{res}         23        3.35       26.20
{txt}        650 {c |}{res}         38        5.53       31.73
{txt}        660 {c |}{res}         32        4.66       36.39
{txt}        670 {c |}{res}         33        4.80       41.19
{txt}        680 {c |}{res}         36        5.24       46.43
{txt}        690 {c |}{res}         36        5.24       51.67
{txt}        700 {c |}{res}         58        8.44       60.12
{txt}        710 {c |}{res}         36        5.24       65.36
{txt}        720 {c |}{res}         35        5.09       70.45
{txt}        730 {c |}{res}         39        5.68       76.13
{txt}        740 {c |}{res}         23        3.35       79.48
{txt}        750 {c |}{res}         17        2.47       81.95
{txt}        760 {c |}{res}         30        4.37       86.32
{txt}        770 {c |}{res}         22        3.20       89.52
{txt}        780 {c |}{res}         16        2.33       91.85
{txt}        790 {c |}{res}          9        1.31       93.16
{txt}        800 {c |}{res}         47        6.84      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        687      100.00
{txt}
{com}. gen satV = s10q27sp2
{txt}(130 missing values generated)

{com}. replace satV = . if s10q27sp2 > 800
{txt}(0 real changes made)

{com}. mean satV if relig == 1
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    200

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satV {c |}{col 14}{res}{space 2}   670.85{col 26}{space 2}  5.26283{col 37}{space 5} 660.4719{col 51}{space 3} 681.2281
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satV if relig == 2
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    155

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satV {c |}{col 14}{res}{space 2} 675.4194{col 26}{space 2} 6.431775{col 37}{space 5} 662.7135{col 51}{space 3} 688.1252
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satV if relig == 3
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}     90

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satV {c |}{col 14}{res}{space 2} 675.3333{col 26}{space 2} 7.824862{col 37}{space 5} 659.7855{col 51}{space 3} 690.8812
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satV if relig == 4
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    242

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satV {c |}{col 14}{res}{space 2} 703.9256{col 26}{space 2} 4.049035{col 37}{space 5} 695.9496{col 51}{space 3} 711.9016
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. mean satV
{res}
{txt}Mean estimation{col 37}Number of obs{col 54}= {res}    687

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}       Mean{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{space 8}satV {c |}{col 14}{res}{space 2} 684.1194{col 26}{space 2} 2.796357{col 37}{space 5} 678.6289{col 51}{space 3} 689.6098
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. 
. *Religious service attendance
. gen religserv_freq = .
{txt}(817 missing values generated)

{com}. replace religserv_freq = 1 if s10q16 == "Never"
{txt}(252 real changes made)

{com}. replace religserv_freq = 2 if s10q16 == "Less than once a month"
{txt}(311 real changes made)

{com}. replace religserv_freq = 3 if s10q16 == "Once a month"
{txt}(50 real changes made)

{com}. replace religserv_freq = 4 if s10q16 == "A few times a month"
{txt}(79 real changes made)

{com}. replace religserv_freq = 5 if s10q16 == "Once a week"
{txt}(89 real changes made)

{com}. replace religserv_freq = 6 if s10q16 == "A few times a week"
{txt}(29 real changes made)

{com}. replace religserv_freq = 7 if s10q16 == "Once a day"
{txt}(3 real changes made)

{com}. replace religserv_freq = 8 if s10q16 == "More than once a day"
{txt}(2 real changes made)

{com}. 
. gen att = .
{txt}(817 missing values generated)

{com}. replace att = 1 if religserv_freq >= 5
{txt}(125 real changes made)

{com}. replace att = 0 if religserv_freq < 5
{txt}(692 real changes made)

{com}. 
. su att if relig == 1

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}att {c |}{res}       254    .3070866    .4621964          0          1
{txt}
{com}. su att if relig == 2

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}att {c |}{res}       199    .2060302    .4054724          0          1
{txt}
{com}. su att if relig == 3

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}att {c |}{res}        95    .0526316    .2244815          0          1
{txt}
{com}. su att if relig == 4

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}att {c |}{res}       269    .0037175    .0609711          0          1
{txt}
{com}. su att

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}att {c |}{res}       817    .1529988    .3602068          0          1
{txt}
{com}. 
. *pray at least once a day
. tab s10q17

                {txt}s10q17 {c |}      Freq.     Percent        Cum.
{hline 23}{c +}{hline 35}
   A few times a month {c |}{res}         70        8.66        8.66
    {txt}A few times a week {c |}{res}         93       11.51       20.17
{txt}Less than once a month {c |}{res}        162       20.05       40.22
  {txt}More than once a day {c |}{res}         57        7.05       47.28
                 {txt}Never {c |}{res}        279       34.53       81.81
            {txt}Once a day {c |}{res}         88       10.89       92.70
          {txt}Once a month {c |}{res}         29        3.59       96.29
           {txt}Once a week {c |}{res}         30        3.71      100.00
{txt}{hline 23}{c +}{hline 35}
                 Total {c |}{res}        808      100.00
{txt}
{com}. gen onc = .
{txt}(817 missing values generated)

{com}. replace onc = 0 if s10q17 ~= "" 
{txt}(808 real changes made)

{com}. replace onc = 1 if s10q17 == "More than once a day" 
{txt}(57 real changes made)

{com}. replace onc = 1 if s10q17 == "Once a day"
{txt}(88 real changes made)

{com}. su onc if relig == 1

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}onc {c |}{res}       250        .392     .489176          0          1
{txt}
{com}. su onc if relig == 2

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}onc {c |}{res}       196    .1989796     .400255          0          1
{txt}
{com}. su onc if relig == 3

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}onc {c |}{res}        95    .0421053    .2018947          0          1
{txt}
{com}. su onc if relig == 4

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}onc {c |}{res}       267    .0149813    .1217058          0          1
{txt}
{com}. su onc

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 9}onc {c |}{res}       808    .1794554    .3839709          0          1
{txt}
{com}. 
. *N
. count if relig == 1
{res}  254
{txt}
{com}. count if relig == 2
{res}  199
{txt}
{com}. count if relig == 3
{res}   95
{txt}
{com}. count if relig == 4
{res}  269
{txt}
{com}. count
{res}  817
{txt}
{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/gwf25/Desktop/Table 1.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 7 Dec 2015, 10:06:46
{txt}{.-}
{smcl}
{txt}{sf}{ul off}